package cloudoer.blog.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 评论和留言
 */

public class Comment implements Serializable {
    private String id;

    private String text;//内容

    private Date postdate;//发布时间

    private Integer browsecount;//点赞数量

    private String articleid;//所属文章id

    private String commentid;//所属评论id（可以对评论和留言进行再次评论回复）

    private String state;

    private String userid;//用户id

    private User user;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text == null ? null : text.trim();
    }

    public Date getPostdate() {
        return postdate;
    }

    public void setPostdate(Date postdate) {
        this.postdate = postdate;
    }

    public Integer getBrowsecount() {
        return browsecount;
    }

    public void setBrowsecount(Integer browsecount) {
        this.browsecount = browsecount;
    }

    public String getArticleid() {
        return articleid;
    }

    public void setArticleid(String articleid) {
        this.articleid = articleid == null ? null : articleid.trim();
    }

    public String getCommentid() {
        return commentid;
    }

    public void setCommentid(String commentid) {
        this.commentid = commentid == null ? null : commentid.trim();
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state == null ? null : state.trim();
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid == null ? null : userid.trim();
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id='" + id + '\'' +
                ", text='" + text + '\'' +
                ", postdate=" + postdate +
                ", browsecount=" + browsecount +
                ", articleid='" + articleid + '\'' +
                ", commentid='" + commentid + '\'' +
                ", state='" + state + '\'' +
                ", userid='" + userid + '\'' +
                ", user=" + user +
                '}';
    }
}